import React, {Component} from 'react';
import {Link} from 'react-router-dom'

class Goods extends Component {
    componentDidMount() {
        console.log(this.props.history)
    }

    render() {
        return (
            <div>
               <Link to={"/"}>首页</Link>
            </div>
        );
    }

}
//使用withRouter包裹 就可以获取路由信息
export default Goods;